﻿@model MsForgeReboot.Framework.Entities.Comment

@using (Html.BeginForm("PostComment", "Blog", FormMethod.Post)) {
    @Html.ValidationSummary(false)

    @Html.HiddenFor(c => c.BlogPost.Id)

    <fieldset>
        <legend>Pošaljite komentare</legend>
        
        <div>
            @Html.LabelFor(c => c.CommentBy)
        </div>
        <div>
            
            @if (User.Identity.IsAuthenticated) {
                {
                    @Html.DisplayFor(c => c.CommentBy)
                }
            }
            else {
                {
                    @Html.EditorFor(c => c.CommentBy)
                }
            }
        </div>
        @if (!User.Identity.IsAuthenticated) {
             <div>
                 @Html.LabelFor(c => c.Email)
             </div>

             <div>
                 @Html.EditorFor(c => c.Email) - Nije vidljiva ostalim korisnicima
             </div>
         }
        <div>
            @Html.LabelFor(c => c.Body)
        </div>
        
        <div>
            @Html.EditorFor(c => c.Body)
        </div>

        <p>
            <input type="submit" value="Pošalji komentar" />
        </p>          
    </fieldset>


}